import lib.Board;
import lib.BoardEventListener;
import lib.Cell;

public class OthelloBoardEventListener implements BoardEventListener {
	
	public void boardAction (Board board, int row, int col) {
		final OthelloBoard othelloBoard = (OthelloBoard) board ;
		final OthelloCellState cellState = othelloBoard.getCellState(row, col);
		final Cell cell = new Cell(row, col);
		if (cellState == null && othelloBoard.getMoves().contains(cell)) {
			othelloBoard.actionOnCell(cell);	
		}
	}
	
}
